import request from '../utils/request';

// 查询数据库列表
export function listDatabase(query) {
  return request({
    url: '/database/database/list',
    method: 'get',
    params: query
  });
}

// 查询数据库详细
export function getDatabase(id) {
  return request({
    url: '/database/database/' + id,
    method: 'get'
  });
}

// 新增数据库
export function addDatabase(data) {
  return request({
    url: '/database/database',
    method: 'post',
    data: data
  });
}

// 修改数据库
export function updateDatabase(data) {
  return request({
    url: '/database/database',
    method: 'put',
    data: data
  });
}

// 删除数据库
export function delDatabase(ids) {
  return request({
    url: '/database/database/' + ids,
    method: 'delete'
  });
}

// 导出数据库
export function exportDatabase(query) {
  return request({
    url: '/database/database/export',
    method: 'get',
    params: query
  });
}